let sechbtn = document.querySelector(".sechBtn")
        let inp = document.querySelector("input")
        let ul = document.querySelector(".list")
        let clearbtn = document.querySelector(".clearBtn")
        sechbtn.addEventListener("click", function () {
            let Inp = inp.value

            let a = JSON.parse(localStorage.getItem("input"))
            if (a !== null) {
                let arr = a
                arr.unshift(Inp)
                localStorage.setItem("input", JSON.stringify(arr))
                b()
            } else {
                let arr = []
                arr.unshift(Inp)
                localStorage.setItem("input", JSON.stringify(arr))
                b()
            }
        })
        function b() {
            let sum = ""
            let a = JSON.parse(localStorage.getItem("input"))
            for (let i = 0; i < a.length; i++) {
                sum += `<li>${a[i]}</li>`
                ul.innerHTML = sum
            }
        }
        clearbtn.addEventListener("click", function () {
            localStorage.clear()
            ul.textContent = ""
        })
